<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>IDA SDK: Vector packing</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">IDA SDK
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="files.html"><span>Header&#160;Files</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Vector packing</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Convenience functions for packing into vectors. </p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga20c2d8e74d9528be949acc2967fbcc05"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga20c2d8e74d9528be949acc2967fbcc05"></a>
<a class="el" href="pro_8h.html#acb0b22a01885ebdb9ac572343bbc4dab">THREAD_SAFE</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pack__vector.html#ga20c2d8e74d9528be949acc2967fbcc05">append_db</a> (<a class="el" href="classbytevec__t.html">bytevec_t</a> &amp;v, <a class="el" href="pro_8h.html#a65f85814a8290f9797005d3b28e7e5fc">uchar</a> x)</td></tr>
<tr class="memdesc:ga20c2d8e74d9528be949acc2967fbcc05"><td class="mdescLeft">&#160;</td><td class="mdescRight">Append a byte to a bytevec. <br /></td></tr>
<tr class="separator:ga20c2d8e74d9528be949acc2967fbcc05"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabb85524b5f5cd86e38e24d77017b36e3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gabb85524b5f5cd86e38e24d77017b36e3"></a>
<a class="el" href="pro_8h.html#acb0b22a01885ebdb9ac572343bbc4dab">THREAD_SAFE</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pack__vector.html#gabb85524b5f5cd86e38e24d77017b36e3">append_obj</a> (<a class="el" href="classbytevec__t.html">bytevec_t</a> &amp;v, const void *obj, size_t size)</td></tr>
<tr class="memdesc:gabb85524b5f5cd86e38e24d77017b36e3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Append 'size' bytes from 'obj' to the bytevec;. <br /></td></tr>
<tr class="separator:gabb85524b5f5cd86e38e24d77017b36e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga685a9afc95f52cee50f639351d1e05a5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga685a9afc95f52cee50f639351d1e05a5"></a>
<a class="el" href="pro_8h.html#acb0b22a01885ebdb9ac572343bbc4dab">THREAD_SAFE</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pack__vector.html#ga685a9afc95f52cee50f639351d1e05a5">append_dw</a> (<a class="el" href="classbytevec__t.html">bytevec_t</a> &amp;v, <a class="el" href="pro_8h.html#a05f6b0ae8f6a6e135b0e290c25fe0e4e">uint16</a> x)</td></tr>
<tr class="memdesc:ga685a9afc95f52cee50f639351d1e05a5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pack a word and append the result to the bytevec. <br /></td></tr>
<tr class="separator:ga685a9afc95f52cee50f639351d1e05a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga04ed87b84bdb645ee6f620e86ff1c379"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga04ed87b84bdb645ee6f620e86ff1c379"></a>
<a class="el" href="pro_8h.html#acb0b22a01885ebdb9ac572343bbc4dab">THREAD_SAFE</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pack__vector.html#ga04ed87b84bdb645ee6f620e86ff1c379">append_dd</a> (<a class="el" href="classbytevec__t.html">bytevec_t</a> &amp;v, <a class="el" href="pro_8h.html#a1134b580f8da4de94ca6b1de4d37975e">uint32</a> x)</td></tr>
<tr class="memdesc:ga04ed87b84bdb645ee6f620e86ff1c379"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pack a double word and append the result to the bytevec. <br /></td></tr>
<tr class="separator:ga04ed87b84bdb645ee6f620e86ff1c379"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7bea2b838986079b66dd1e7cb208f0c1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga7bea2b838986079b66dd1e7cb208f0c1"></a>
<a class="el" href="pro_8h.html#acb0b22a01885ebdb9ac572343bbc4dab">THREAD_SAFE</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pack__vector.html#ga7bea2b838986079b66dd1e7cb208f0c1">append_dq</a> (<a class="el" href="classbytevec__t.html">bytevec_t</a> &amp;v, <a class="el" href="pro_8h.html#a2f5563986d7f95e4fad5876c17d9cdda">uint64</a> x)</td></tr>
<tr class="memdesc:ga7bea2b838986079b66dd1e7cb208f0c1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pack a quadword and append the result to the bytevec. <br /></td></tr>
<tr class="separator:ga7bea2b838986079b66dd1e7cb208f0c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7fce49a86450f8299d414a02e3422683"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga7fce49a86450f8299d414a02e3422683"></a>
<a class="el" href="pro_8h.html#acb0b22a01885ebdb9ac572343bbc4dab">THREAD_SAFE</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pack__vector.html#ga7fce49a86450f8299d414a02e3422683">append_ea</a> (<a class="el" href="classbytevec__t.html">bytevec_t</a> &amp;v, <a class="el" href="pro_8h.html#a7b0aeaed04e477c02cf8ea3452002d1a">ea_t</a> x)</td></tr>
<tr class="memdesc:ga7fce49a86450f8299d414a02e3422683"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pack an ea value and append the result to the bytevec. <br /></td></tr>
<tr class="separator:ga7fce49a86450f8299d414a02e3422683"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga53bf35f3e2eb067182a33d4c2bf845c0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga53bf35f3e2eb067182a33d4c2bf845c0"></a>
<a class="el" href="pro_8h.html#acb0b22a01885ebdb9ac572343bbc4dab">THREAD_SAFE</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pack__vector.html#ga53bf35f3e2eb067182a33d4c2bf845c0">append_ds</a> (<a class="el" href="classbytevec__t.html">bytevec_t</a> &amp;v, const char *x)</td></tr>
<tr class="memdesc:ga53bf35f3e2eb067182a33d4c2bf845c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pack a string and append the result to the bytevec. <br /></td></tr>
<tr class="separator:ga53bf35f3e2eb067182a33d4c2bf845c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga592ea1de382514899aaae075eadba456"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga592ea1de382514899aaae075eadba456"></a>
<a class="el" href="pro_8h.html#acb0b22a01885ebdb9ac572343bbc4dab">THREAD_SAFE</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pack__vector.html#ga592ea1de382514899aaae075eadba456">append_buf</a> (<a class="el" href="classbytevec__t.html">bytevec_t</a> &amp;v, const void *buf, size_t len)</td></tr>
<tr class="memdesc:ga592ea1de382514899aaae075eadba456"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pack an object of size 'len' and append the result to the bytevec. <br /></td></tr>
<tr class="separator:ga592ea1de382514899aaae075eadba456"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadab98df14129693976278d438dd0aebb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="pro_8h.html#acb0b22a01885ebdb9ac572343bbc4dab">THREAD_SAFE</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__pack__vector.html#gadab98df14129693976278d438dd0aebb">append_eavec</a> (<a class="el" href="classbytevec__t.html">bytevec_t</a> &amp;v, <a class="el" href="pro_8h.html#a7b0aeaed04e477c02cf8ea3452002d1a">ea_t</a> ea, const <a class="el" href="pro_8h.html#a9f46d9d52bbfcc78bc1836f4f2683da4">eavec_t</a> &amp;insns)</td></tr>
<tr class="memdesc:gadab98df14129693976278d438dd0aebb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pack an eavec and append the result to the bytevec.  <a href="#gadab98df14129693976278d438dd0aebb">More...</a><br /></td></tr>
<tr class="separator:gadab98df14129693976278d438dd0aebb"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="gadab98df14129693976278d438dd0aebb"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pro_8h.html#acb0b22a01885ebdb9ac572343bbc4dab">THREAD_SAFE</a> void append_eavec </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classbytevec__t.html">bytevec_t</a> &amp;&#160;</td>
          <td class="paramname"><em>v</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pro_8h.html#a7b0aeaed04e477c02cf8ea3452002d1a">ea_t</a>&#160;</td>
          <td class="paramname"><em>ea</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="pro_8h.html#a9f46d9d52bbfcc78bc1836f4f2683da4">eavec_t</a> &amp;&#160;</td>
          <td class="paramname"><em>insns</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Pack an eavec and append the result to the bytevec. </p>
<p>Also see <a class="el" href="kernwin_8hpp.html#ab9de34cc4412f2ddc272860ffe07fc22" title="Unpack a vector of ea values. ">unpack_eavec()</a>. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">v</td><td>output vector </td></tr>
    <tr><td class="paramname">ea</td><td>when we pack an eavec, we only store the differences between each value and this parameter. <br />
 This is because groups of ea values will likely be similar, and therefore the differences will usually be small. <br />
 A good example is packing the addresses of a function prologue. <br />
 One can pass the start ea of the function as this parameter, which results in a quick and efficient packing/unpacking. <br />
 (Just be sure to use the func's start ea when unpacking, of course) </td></tr>
    <tr><td class="paramname">insns</td><td>eavec to pack </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
</body>
</html>
